A file is an external permanent object stored in a file system. Files are accessed in T via ports. Ordinarily, files are sequences of characters, similar to strings. An input port open on an existing file delivers successive characters (or lines, or parsed objects) out of the file. An output port open on a new file deposits successive characters (or lines, or printed representations of objects) into the file.
OPEN and MAYBE-OPEN obtain ports which access files. Any port created by OPEN or MAYBE-OPEN should be closed (using the CLOSE operation, page ) when no further access to the file is required. This is guaranteed if OPEN and MAYBE-OPEN are always used in conjunction with WITH-OPEN-PORTS (page ), which ensures that any port opened actually gets closed, even if there is a throw out of the body of the WITH-OPEN-PORTS form.